-
Notifications
You must be signed in to change notification settings - Fork 15
chenges to add universal member to groups #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
if (res && res.records.length === 0) { | ||
res = await tx.run(`CREATE (user:User {id: {id}}) RETURN user`, { id }) | ||
if (res && res.records.length === 0) { | ||
res = await tx.run(`CREATE (user:User {id: '00000000', universalUID: {id}}) RETURN user`, {id}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the Id
field not allowed to be null
?
res = await tx.run(`MATCH (e:${model} {id: {id}}) RETURN e`, {id}) | ||
|
||
if (res && res.records.length === 0) { | ||
res = await tx.run(`CREATE (user:User {id: {id}, universalUID: '00000000'}) RETURN user`, {id}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we put a null
in instead of zeros?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get the swagger updated as well?
I also want to add in fetching of the universal Id for a user when a normal TC member Id is used. I believe I need to add an endpoint to the U-Bahn API for this first though.
cc: @callmekatootie
@@ -107,9 +107,9 @@ async function addGroupMember(currentUser, groupId, data) { | |||
oldId: data.oldId, | |||
name: group.name, | |||
createdAt, | |||
...(currentUser === 'M2M' ? {} : { createdBy: currentUser.userId }), | |||
...(currentUser === 'M2M' ? {} : {createdBy: currentUser.userId}), | |||
memberId: data.memberId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we not using the M2M clientId for the createdUser/updatedUser values ?
membershipId, | ||
membershipType: data.membershipType, | ||
createdAt, | ||
createdBy: currentUser === 'M2M' ? '00000000' : currentUser.userId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use null instead of zeros?
name: group.name, | ||
createdAt, | ||
...(currentUser === 'M2M' ? {} : {createdBy: currentUser.userId}), | ||
memberId: '00000000', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nullable?
No description provided.